<template>
	<u-tabbar v-model="current" active-color='#D81E06' :list="list" icon-size="50" height="120rpx" @change="change">
	</u-tabbar>
</template>

<script>
	import configService from '@/common/service/config.service.js'
	export default {
		name: "foot-view",
		data() {
			return {
				// "color": "#333333",
				list: [{
					pagePath: "pages/home/index",
					text: "首页",
					iconPath: "static/tabBar/index_default.png",
					selectedIconPath: "static/tabBar/index_active.png",
					count: 0
				}, {
					pagePath: "pages/active/index",
					text: "活动",
					iconPath: "static/tabBar/active_default.png",
					selectedIconPath: "static/tabBar/active_active.png"
				}, {
					pagePath: "pages/advise/index",
					text: "提建议",
					iconPath: "static/tabBar/advise_default.png",
					selectedIconPath: "static/tabBar/advise_active.png",
					count: 0
				}, {
					pagePath: "pages/message/index",
					text: "消息",
					iconPath: "static/tabBar/message_default.png",
					selectedIconPath: "static/tabBar/message_active.png",
					count: 0
				}, {
					pagePath: "pages/mine/index",
					text: "我的",
					iconPath: "static/tabBar/mine_default.png",
					selectedIconPath: "static/tabBar/mine_active.png",
					count: 0
				}],

				// list: [
				// 	{
				// 		iconPath: `${configService.staticDomainURL}/newPages/tabbar/icon-home.png?111`,
				// 		selectedIconPath: `${configService.staticDomainURL}/newPages/tabbar/icon-home-fill.png?1`,
				// 		text: '页面1',
				// 		pagePath: '/pages/index/index',
				// 		count: 0,
				// 	},
				// 	{
				// 		iconPath: `${configService.staticDomainURL}/newPages/tabbar/icon-collect.png?1`,
				// 		selectedIconPath: `${configService.staticDomainURL}/newPages/tabbar/icon-collect-fill.png?1`,
				// 		text: '页面2',
				// 		pagePath: '/pages/index/index1',
				// 		count: 0,
				// 	}
				// ],
				current: 0
			}
		},
		props: ['currpage', 'myBadge'],
		methods: {
			change(index) {
				// this.current = index
				// console.log(this.current)
			},
			// async beforeSwitch(index) {
			//   // await等待一个请求，请求回来后再返回true，再进行切换
			//   let data = await this.$u.post('url');
			//   return true; // 或者根据逻辑返回false
			// }
		}
	}
</script>

<style scoped>
</style>